package com.esri.android.map;

/* loaded from: classes.dex */
public class Grid {
    private GridType a = GridType.NONE;
    private boolean b = true;
    private MapSurface c;

    private static native void nativeSetGridType(long j, int i);

    private static native void nativeSetGridVisibility(long j, boolean z);

    /* loaded from: classes.dex */
    public enum GridType {
        NONE(1),
        MGRS(2);
        
        private final int a;

        GridType(int i) {
            this.a = i;
        }

        public int index() {
            return this.a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public Grid(MapSurface mapSurface) {
        this.c = mapSurface;
    }

    public void setType(GridType gridType) {
        if (gridType == null || gridType == this.a) {
            return;
        }
        this.a = gridType;
        nativeSetGridType(this.c.l, gridType.index());
    }

    public GridType getType() {
        return this.a;
    }

    public boolean getVisibility() {
        return this.b;
    }

    public void setVisibility(boolean z) {
        if (z != this.b) {
            this.b = z;
            nativeSetGridVisibility(this.c.l, z);
        }
    }
}
